package com.kapcb.secure.configuration.constant;

import com.kapcb.common.constant.PropertiesConstant;
import com.kapcb.common.constant.StringPool;

/**
 * <a>Title: ConfigurationConstant </a>
 * <a>Author: cb <a>
 * <a>Description: ConfigurationConstant <a>
 *
 * @author cb
 * @version 1.0
 * @date 2024/4/20 10:34 PM
 * @since 1.0
 */
public interface ConfigurationConstant {

    /**
     * 默认配置保护密钥
     */
    String SECRET_KEY = "kapcb";

    /**
     * 公共配置参数
     */
    String COMMON_PROPERTIES_CONFIGURATION = PropertiesConstant.PROPERTIES_PREFIX + StringPool.DOT + "configuration";

    /**
     * 默认配置保护密文后缀
     */
    String DECRYPT_CHARACTERISTIC_SUFFIX = "]";

    /**
     * 默认配置保护密文前缀
     */
    String DECRYPT_CHARACTERISTIC_PREFIX = "Enc[";

    /**
     * 是否开启 API 加解密安全保护
     */
    String ENABLE_API_SECURE = PropertiesConstant.PROPERTIES_PREFIX + StringPool.DOT + "api.enable.secure";

    /**
     * 是否开启 MyBaits 加解密安全保护
     */
    String ENABLE_MYBATIS_SECURE = PropertiesConstant.PROPERTIES_PREFIX + StringPool.DOT + "mybatis.enable.secure";

    /**
     * 是否开启配置保护
     */
    String ENABLE_CONFIGURATION_SECURE = COMMON_PROPERTIES_CONFIGURATION + ".enable.secure";

    /**
     * 配置保护前缀
     */
    String CONFIGURATION_DECRYPT_PREFIX = COMMON_PROPERTIES_CONFIGURATION + ".decrypt.prefix";

    /**
     * 配置保护后缀
     */
    String CONFIGURATION_DECRYPT_SUFFIX = COMMON_PROPERTIES_CONFIGURATION + ".decrypt.suffix";

    /**
     * 配置保护密钥
     */
    String CONFIGURATION_DECRYPT_SECRET = COMMON_PROPERTIES_CONFIGURATION + ".decrypt.secret.key";

}
